-
Notifications
You must be signed in to change notification settings - Fork 4
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR fixes mutating admission webhook for me. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
As a side note, changing the order of resources in Nevertheless, In order to eliminate those warnings from
No warnings in operator events:
I have a working POC of this approach in my local branch, run a few tests on it and it looks like this is working fine (but definitely needs to be thoroughly tested in CI). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, @alembiewski. The fix LGTM 👍
@alembiewski, the idea of splitting the deploy phase into multiple steps sounds reasonable to me. We should have a discussion around the naming and find a suitable steps breakdown. I think we shouldn't be very granular because some of the steps are optional (e.g. History Server installation) and it might look confusing if users see it in the steps if it is not enabled. I'd suggest having two bigger steps like |
@akirillov, sounds good, thanks! |
What changes were proposed in this pull request?
This PR contains fixes for mutation admission webhook, which used to customize Spark driver and executor pods based on the specification in
SparkApplication
objects.After the fix is accepted and verified, it should be applied to kudobuilder/operators#118 as well.
Why are the changes needed?
While working on DCOS-60865: Test pod affinity and tolerations support, it was discovered, that aforementioned features didn't work as expected, even though webhook was enabled by default and service was installed. Operator's description showed the following warning:
But
spark-webhook-certs
was actually present:If we look at the
AGE
columns for each object, we can see the operator instancetest-instance-5869fb6d47-7tqw5
was created beforespark-webhook-certs
secret:Also,
-webhook-svc-name
was changed to adhere this declaration:https://github.com/mesosphere/kudo-spark-operator/blob/2d7765b2569e551d53ed5c14ac93c232aabc52e0/kudo-operator/operator/templates/webhook-init-job.yaml#L23
After those fixes were applied,
ownerReferences
,affinity
andtolerations
appeared inPod
's spec and worked as expected:How were the changes tested?
Tests from this repo
Tested locally in the scope of DCOS-60865: Test pod affinity and tolerations support